Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes the
auxiliary/scanner/ntp/ntp_nak_to_the_future
module which was broken in commit 5f88971 (landed in #8185). The issue was that when theBinData::Record
instance is sent with the socket, the string representation of it was used instead of the packed binary. It should be calling#to_binar_s
. This PR fixes the issue and documents how the module can be tested.This was the only module that used the
NTPSymmetric
definition and it's been converted to instead use the newNTPHeader
definition which adds more natural handing forNTPTimestamp
andNTPShort
fields. TheNTPHeader
definition was originally written for #19748 and these two PRs share common commits in their history for the new definition.Other NTP modules could be broken and have not been tested. NTPSymmetric had the most overlap with the definition needed for timeroast, so that was the only one that was thoroughly reviewed.
Verification
docker build -t ntpd:4.2.8p3 .
docker run --rm -it --name ntp-server -p 123:123/udp ntpd:4.2.8p3
msfconsole
and use the moduleRHOSTS
value as necessaryDemo